<?php
/**
 * Rule Set
 * This is the rule set that should be used to integrate with Visi library code.
 *
 * @package     Visi
 * @subpackage  Rules
 * @author      Luke Visinoni <luke.visinoni@gmail.com>
 * @copyright   (c) 2010 Luke Visinoni <luke.visinoni@gmail.com>
 * @version     $Id$
 */
class Visi_Rule_Set extends Q_Rule_Set {

    public function validate($data, $fieldsToValidate = null, $setErrors = true) {
    
        if (!parent::validate($data, $fieldsToValidate)) {
            if ($setErrors) {
                Visi_View_Helper_FormError::setErrors($this->getErrors());
            }
            return false;
        } else {
            return true;
        }
    
    }

}